import pandas as pd
import os

# 文件夹路径
input_folder = r'c:\Users\admin\Desktop\homework\课程信息'

# 遍历所有Excel文件
for filename in os.listdir(input_folder):
    if filename.endswith('.xls'):
        file_path = os.path.join(input_folder, filename)
        print(f'\n\n====================================')
        print(f'完整内容 - {filename}')
        print(f'====================================')
        
        # 读取Excel文件
        df = pd.read_excel(file_path)
        
        # 显示完整的DataFrame
        pd.set_option('display.max_rows', None)
        pd.set_option('display.max_columns', None)
        pd.set_option('display.max_colwidth', None)
        
        print(df)
        print('\n' + '='*60)